/* ***** BEGIN LICENSE BLOCK *****
 * This file is part of Natron <https://natrongithub.github.io/>,
 * (C) 2018-2020 The Natron developers
 * (C) 2013-2018 INRIA and Alexandre Gauthier-Foichat
 *
 * Natron is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * Natron is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Natron.  If not, see <http://www.gnu.org/licenses/gpl-2.0.html>
 * ***** END LICENSE BLOCK ***** */

#ifndef KEYSYMBOLS_H
#define KEYSYMBOLS_H

#include <ofxKeySyms.h>
#include "Global/Enums.h"
#include "Global/Macros.h"


NATRON_NAMESPACE_ENTER


enum Key
{
    Key_Unknown =  kOfxKey_Unknown,

    Key_BackSpace = kOfxKey_BackSpace,
    Key_Tab = kOfxKey_Tab,
    Key_Linefeed = kOfxKey_Linefeed,
    Key_Clear = kOfxKey_Clear,
    Key_Return = kOfxKey_Return,
    Key_Pause = kOfxKey_Pause,
    Key_Scroll_Lock = kOfxKey_Scroll_Lock,
    Key_Sys_Req = kOfxKey_Sys_Req,
    Key_Escape = kOfxKey_Escape,
    Key_Delete = kOfxKey_Delete,

    Key_Multi_key = kOfxKey_Multi_key,
    Key_SingleCandidate = kOfxKey_SingleCandidate,
    Key_MultipleCandidate = kOfxKey_MultipleCandidate,
    Key_PreviousCandidate = kOfxKey_PreviousCandidate,

    Key_Kanji = kOfxKey_Kanji,
    Key_Muhenkan = kOfxKey_Muhenkan,
    Key_Henkan_Mode = kOfxKey_Henkan_Mode,
    Key_Henkan = kOfxKey_Henkan,
    Key_Romaji = kOfxKey_Romaji,
    Key_Hiragana = kOfxKey_Hiragana,
    Key_Katakana = kOfxKey_Katakana,
    Key_Hiragana_Katakana = kOfxKey_Hiragana_Katakana,
    Key_Zenkaku = kOfxKey_Zenkaku,
    Key_Hankaku = kOfxKey_Hankaku,
    Key_Zenkaku_Hankaku = kOfxKey_Zenkaku_Hankaku,
    Key_Touroku = kOfxKey_Touroku,
    Key_Massyo = kOfxKey_Massyo,
    Key_Kana_Lock = kOfxKey_Kana_Lock,
    Key_Kana_Shift = kOfxKey_Kana_Shift,
    Key_Eisu_Shift = kOfxKey_Eisu_Shift,
    Key_Eisu_toggle = kOfxKey_Eisu_toggle,
    Key_Zen_Koho = kOfxKey_Zen_Koho,
    Key_Mae_Koho = kOfxKey_Mae_Koho,

    Key_Home = kOfxKey_Home,
    Key_Left = kOfxKey_Left,
    Key_Up = kOfxKey_Up,
    Key_Right = kOfxKey_Right,
    Key_Down = kOfxKey_Down,
    Key_Prior = kOfxKey_Prior,
    Key_Page_Up = kOfxKey_Page_Up,
    Key_Next = kOfxKey_Next,
    Key_Page_Down = kOfxKey_Page_Down,
    Key_End = kOfxKey_End,
    Key_Begin = kOfxKey_Begin,

    Key_Select = kOfxKey_Select,
    Key_Print = kOfxKey_Print,
    Key_Execute = kOfxKey_Execute,
    Key_Insert = kOfxKey_Insert,
    Key_Undo = kOfxKey_Undo,
    Key_Redo = kOfxKey_Redo,
    Key_Menu = kOfxKey_Menu,
    Key_Find = kOfxKey_Find,
    Key_Cancel = kOfxKey_Cancel,
    Key_Help = kOfxKey_Help,
    Key_Break = kOfxKey_Break,
    Key_Mode_switch = kOfxKey_Mode_switch,
    Key_script_switch = kOfxKey_script_switch,
    Key_Num_Lock = kOfxKey_Num_Lock,

    Key_KP_Space = kOfxKey_KP_Space,
    Key_KP_Tab = kOfxKey_KP_Tab,
    Key_KP_Enter = kOfxKey_KP_Enter,
    Key_KP_F1 = kOfxKey_KP_F1,
    Key_KP_F2 = kOfxKey_KP_F2,
    Key_KP_F3 = kOfxKey_KP_F3,
    Key_KP_F4 = kOfxKey_KP_F4,
    Key_KP_Home = kOfxKey_KP_Home,
    Key_KP_Left = kOfxKey_KP_Left,
    Key_KP_Up = kOfxKey_KP_Up,
    Key_KP_Right = kOfxKey_KP_Right,
    Key_KP_Down = kOfxKey_KP_Down,
    Key_KP_Prior = kOfxKey_KP_Prior,
    Key_KP_Page_Up = kOfxKey_KP_Page_Up,
    Key_KP_Next = kOfxKey_KP_Next,
    Key_KP_Page_Down = kOfxKey_KP_Page_Down,
    Key_KP_End = kOfxKey_KP_End,
    Key_KP_Begin = kOfxKey_KP_Begin,
    Key_KP_Insert = kOfxKey_KP_Insert,
    Key_KP_Delete = kOfxKey_KP_Delete,
    Key_KP_Equal = kOfxKey_KP_Equal,
    Key_KP_Multiply = kOfxKey_KP_Multiply,
    Key_KP_Add = kOfxKey_KP_Add,
    Key_KP_Separator = kOfxKey_KP_Separator,
    Key_KP_Subtract = kOfxKey_KP_Subtract,
    Key_KP_Decimal = kOfxKey_KP_Decimal,
    Key_KP_Divide = kOfxKey_KP_Divide,

    Key_KP_0 = kOfxKey_KP_0,
    Key_KP_1 = kOfxKey_KP_1,
    Key_KP_2 = kOfxKey_KP_2,
    Key_KP_3 = kOfxKey_KP_3,
    Key_KP_4 = kOfxKey_KP_4,
    Key_KP_5 = kOfxKey_KP_5,
    Key_KP_6 = kOfxKey_KP_6,
    Key_KP_7 = kOfxKey_KP_7,
    Key_KP_8 = kOfxKey_KP_8,
    Key_KP_9 = kOfxKey_KP_9,

    Key_F1 = kOfxKey_F1,
    Key_F2 = kOfxKey_F2,
    Key_F3 = kOfxKey_F3,
    Key_F4 = kOfxKey_F4,
    Key_F5 = kOfxKey_F5,
    Key_F6 = kOfxKey_F6,
    Key_F7 = kOfxKey_F7,
    Key_F8 = kOfxKey_F8,
    Key_F9 = kOfxKey_F9,
    Key_F10 = kOfxKey_F10,
    Key_F11 = kOfxKey_F11,
    Key_L1 = kOfxKey_L1,
    Key_F12 = kOfxKey_F12,
    Key_L2 = kOfxKey_L2,
    Key_F13 = kOfxKey_F13,
    Key_L3 = kOfxKey_L3,
    Key_F14 = kOfxKey_F14,
    Key_L4 = kOfxKey_L4,
    Key_F15 = kOfxKey_F15,
    Key_L5 = kOfxKey_L5,
    Key_F16 = kOfxKey_F16,
    Key_L6 = kOfxKey_L6,
    Key_F17 = kOfxKey_F17,
    Key_L7 = kOfxKey_L7,
    Key_F18 = kOfxKey_F18,
    Key_L8 = kOfxKey_L8,
    Key_F19 = kOfxKey_F19,
    Key_L9 = kOfxKey_L9,
    Key_F20 = kOfxKey_F20,
    Key_L10 = kOfxKey_L10,
    Key_F21 = kOfxKey_F21,
    Key_R1 = kOfxKey_R1,
    Key_F22 = kOfxKey_F22,
    Key_R2 = kOfxKey_R2,
    Key_F23 = kOfxKey_F23,
    Key_R3 = kOfxKey_R3,
    Key_F24 = kOfxKey_F24,
    Key_R4 = kOfxKey_R4,
    Key_F25 = kOfxKey_F25,
    Key_R5 = kOfxKey_R5,
    Key_F26 = kOfxKey_F26,
    Key_R6 = kOfxKey_R6,
    Key_F27 = kOfxKey_F27,
    Key_R7 = kOfxKey_R7,
    Key_F28 = kOfxKey_F28,
    Key_R8 = kOfxKey_R8,
    Key_F29 = kOfxKey_F29,
    Key_R9 = kOfxKey_R9,
    Key_F30 = kOfxKey_F30,
    Key_R10 = kOfxKey_R10,
    Key_F31 = kOfxKey_F31,
    Key_R11 = kOfxKey_R11,
    Key_F32 = kOfxKey_F32,
    Key_R12 = kOfxKey_R12,
    Key_F33 = kOfxKey_F33,
    Key_R13 = kOfxKey_R13,
    Key_F34 = kOfxKey_F34,
    Key_R14 = kOfxKey_R14,
    Key_F35 = kOfxKey_F35,
    Key_R15 = kOfxKey_R15,

// Note that on the Mac:
// cmd/apple/cloverleaf is kOfxKey_Control_L
// ctrl is kOfxKey_Meta_L
// alt/option is kOfxKey_Alt_L
// Qt does the translation for us
    Key_Shift_L = kOfxKey_Shift_L,
    Key_Shift_R = kOfxKey_Shift_R,
    Key_Control_L = kOfxKey_Control_L,
    Key_Control_R = kOfxKey_Control_R,
    Key_Caps_Lock = kOfxKey_Caps_Lock,
    Key_Shift_Lock = kOfxKey_Shift_Lock,

    Key_Meta_L = kOfxKey_Meta_L,
    Key_Meta_R = kOfxKey_Meta_R,
    Key_Alt_L = kOfxKey_Alt_L,
    Key_Alt_R = kOfxKey_Alt_R,
    Key_Super_L = kOfxKey_Super_L,
    Key_Super_R = kOfxKey_Super_R,
    Key_Hyper_L = kOfxKey_Hyper_L,
    Key_Hyper_R = kOfxKey_Hyper_R,

    Key_space = kOfxKey_space,
    Key_exclam = kOfxKey_exclam,
    Key_quotedbl = kOfxKey_quotedbl,
    Key_numbersign = kOfxKey_numbersign,
    Key_dollar = kOfxKey_dollar,
    Key_percent = kOfxKey_percent,
    Key_ampersand = kOfxKey_ampersand,
    Key_apostrophe = kOfxKey_apostrophe,
    Key_quoteright = kOfxKey_quoteright,
    Key_parenleft = kOfxKey_parenleft,
    Key_parenright = kOfxKey_parenright,
    Key_asterisk = kOfxKey_asterisk,
    Key_plus = kOfxKey_plus,
    Key_comma = kOfxKey_comma,
    Key_minus = kOfxKey_minus,
    Key_period = kOfxKey_period,
    Key_slash = kOfxKey_slash,
    Key_0 = kOfxKey_0,
    Key_1 = kOfxKey_1,
    Key_2 = kOfxKey_2,
    Key_3 = kOfxKey_3,
    Key_4 = kOfxKey_4,
    Key_5 = kOfxKey_5,
    Key_6 = kOfxKey_6,
    Key_7 = kOfxKey_7,
    Key_8 = kOfxKey_8,
    Key_9 = kOfxKey_9,
    Key_colon = kOfxKey_colon,
    Key_semicolon = kOfxKey_semicolon,
    Key_less = kOfxKey_less,
    Key_equal = kOfxKey_equal,
    Key_greater = kOfxKey_greater,
    Key_question = kOfxKey_question,
    Key_at = kOfxKey_at,
    Key_A = kOfxKey_A,
    Key_B = kOfxKey_B,
    Key_C = kOfxKey_C,
    Key_D = kOfxKey_D,
    Key_E = kOfxKey_E,
    Key_F = kOfxKey_F,
    Key_G = kOfxKey_G,
    Key_H = kOfxKey_H,
    Key_I = kOfxKey_I,
    Key_J = kOfxKey_J,
    Key_K = kOfxKey_K,
    Key_L = kOfxKey_L,
    Key_M = kOfxKey_M,
    Key_N = kOfxKey_N,
    Key_O = kOfxKey_O,
    Key_P = kOfxKey_P,
    Key_Q = kOfxKey_Q,
    Key_R = kOfxKey_R,
    Key_S = kOfxKey_S,
    Key_T = kOfxKey_T,
    Key_U = kOfxKey_U,
    Key_V = kOfxKey_V,
    Key_W = kOfxKey_W,
    Key_X = kOfxKey_X,
    Key_Y = kOfxKey_Y,
    Key_Z = kOfxKey_Z,
    Key_bracketleft = kOfxKey_bracketleft,
    Key_backslash = kOfxKey_backslash,
    Key_bracketright = kOfxKey_bracketright,
    Key_asciicircum = kOfxKey_asciicircum,
    Key_underscore = kOfxKey_underscore,
    Key_grave = kOfxKey_grave,
    Key_quoteleft = kOfxKey_quoteleft,
    Key_a = kOfxKey_a,
    Key_b = kOfxKey_b,
    Key_c = kOfxKey_c,
    Key_d = kOfxKey_d,
    Key_e = kOfxKey_e,
    Key_f = kOfxKey_f,
    Key_g = kOfxKey_g,
    Key_h = kOfxKey_h,
    Key_i = kOfxKey_i,
    Key_j = kOfxKey_j,
    Key_k = kOfxKey_k,
    Key_l = kOfxKey_l,
    Key_m = kOfxKey_m,
    Key_n = kOfxKey_n,
    Key_o = kOfxKey_o,
    Key_p = kOfxKey_p,
    Key_q = kOfxKey_q,
    Key_r = kOfxKey_r,
    Key_s = kOfxKey_s,
    Key_t = kOfxKey_t,
    Key_u = kOfxKey_u,
    Key_v = kOfxKey_v,
    Key_w = kOfxKey_w,
    Key_x = kOfxKey_x,
    Key_y = kOfxKey_y,
    Key_z = kOfxKey_z,
    Key_braceleft = kOfxKey_braceleft,
    Key_bar = kOfxKey_bar,
    Key_braceright = kOfxKey_braceright,
    Key_asciitilde = kOfxKey_asciitilde,

    Key_nobreakspace = kOfxKey_nobreakspace,
    Key_exclamdown = kOfxKey_exclamdown,
    Key_cent = kOfxKey_cent,
    Key_sterling = kOfxKey_sterling,
    Key_currency = kOfxKey_currency,
    Key_yen = kOfxKey_yen,
    Key_brokenbar = kOfxKey_brokenbar,
    Key_section = kOfxKey_section,
    Key_diaeresis = kOfxKey_diaeresis,
    Key_copyright = kOfxKey_copyright,
    Key_ordfeminine = kOfxKey_ordfeminine,
    Key_guillemotleft = kOfxKey_guillemotleft,
    Key_notsign = kOfxKey_notsign,
    Key_hyphen = kOfxKey_hyphen,
    Key_registered = kOfxKey_registered,
    Key_macron = kOfxKey_macron,
    Key_degree = kOfxKey_degree,
    Key_plusminus = kOfxKey_plusminus,
    Key_twosuperior = kOfxKey_twosuperior,
    Key_threesuperior = kOfxKey_threesuperior,
    Key_acute = kOfxKey_acute,
    Key_mu = kOfxKey_mu,
    Key_paragraph = kOfxKey_paragraph,
    Key_periodcentered = kOfxKey_periodcentered,
    Key_cedilla = kOfxKey_cedilla,
    Key_onesuperior = kOfxKey_onesuperior,
    Key_masculine = kOfxKey_masculine,
    Key_guillemotright = kOfxKey_guillemotright,
    Key_onequarter = kOfxKey_onequarter,
    Key_onehalf = kOfxKey_onehalf,
    Key_threequarters = kOfxKey_threequarters,
    Key_questiondown = kOfxKey_questiondown,
    Key_Agrave = kOfxKey_Agrave,
    Key_Aacute = kOfxKey_Aacute,
    Key_Acircumflex = kOfxKey_Acircumflex,
    Key_Atilde = kOfxKey_Atilde,
    Key_Adiaeresis = kOfxKey_Adiaeresis,
    Key_Aring = kOfxKey_Aring,
    Key_AE = kOfxKey_AE,
    Key_Ccedilla = kOfxKey_Ccedilla,
    Key_Egrave = kOfxKey_Egrave,
    Key_Eacute = kOfxKey_Eacute,
    Key_Ecircumflex = kOfxKey_Ecircumflex,
    Key_Ediaeresis = kOfxKey_Ediaeresis,
    Key_Igrave = kOfxKey_Igrave,
    Key_Iacute = kOfxKey_Iacute,
    Key_Icircumflex = kOfxKey_Icircumflex,
    Key_Idiaeresis = kOfxKey_Idiaeresis,
    Key_ETH = kOfxKey_ETH,
    Key_Eth = kOfxKey_Eth,
    Key_Ntilde = kOfxKey_Ntilde,
    Key_Ograve = kOfxKey_Ograve,
    Key_Oacute = kOfxKey_Oacute,
    Key_Ocircumflex = kOfxKey_Ocircumflex,
    Key_Otilde = kOfxKey_Otilde,
    Key_Odiaeresis = kOfxKey_Odiaeresis,
    Key_multiply = kOfxKey_multiply,
    Key_Ooblique = kOfxKey_Ooblique,
    Key_Ugrave = kOfxKey_Ugrave,
    Key_Uacute = kOfxKey_Uacute,
    Key_Ucircumflex = kOfxKey_Ucircumflex,
    Key_Udiaeresis = kOfxKey_Udiaeresis,
    Key_Yacute = kOfxKey_Yacute,
    Key_THORN = kOfxKey_THORN,
    Key_ssharp = kOfxKey_ssharp,
    Key_agrave = kOfxKey_agrave,
    Key_aacute = kOfxKey_aacute,
    Key_acircumflex = kOfxKey_acircumflex,
    Key_atilde = kOfxKey_atilde,
    Key_adiaeresis = kOfxKey_adiaeresis,
    Key_aring = kOfxKey_aring,
    Key_ae = kOfxKey_ae,
    Key_ccedilla = kOfxKey_ccedilla,
    Key_egrave = kOfxKey_egrave,
    Key_eacute = kOfxKey_eacute,
    Key_ecircumflex = kOfxKey_ecircumflex,
    Key_ediaeresis = kOfxKey_ediaeresis,
    Key_igrave = kOfxKey_igrave,
    Key_iacute = kOfxKey_iacute,
    Key_icircumflex = kOfxKey_icircumflex,
    Key_idiaeresis = kOfxKey_idiaeresis,
    Key_eth = kOfxKey_eth,
    Key_ntilde = kOfxKey_ntilde,
    Key_ograve = kOfxKey_ograve,
    Key_oacute = kOfxKey_oacute,
    Key_ocircumflex = kOfxKey_ocircumflex,
    Key_otilde = kOfxKey_otilde,
    Key_odiaeresis = kOfxKey_odiaeresis,
    Key_division = kOfxKey_division,
    Key_oslash = kOfxKey_oslash,
    Key_ugrave = kOfxKey_ugrave,
    Key_uacute = kOfxKey_uacute,
    Key_ucircumflex = kOfxKey_ucircumflex,
    Key_udiaeresis = kOfxKey_udiaeresis,
    Key_yacute = kOfxKey_yacute,
    Key_thorn = kOfxKey_thorn,
    Key_ydiaeresis = kOfxKey_ydiaeresis
};

enum KeyboardModifierEnum
{
    eKeyboardModifierNone = 0x00000000,
    eKeyboardModifierShift = 0x02000000,
    eKeyboardModifierControl = 0x04000000,
    eKeyboardModifierAlt = 0x08000000,
    eKeyboardModifierMeta = 0x10000000,
    eKeyboardModifierKeypad = 0x20000000,
    eKeyboardModifierGroupSwitch = 0x40000000,
    eKeyboardModifierMask = 0xfe000000
};

DECLARE_FLAGS(KeyboardModifiers, KeyboardModifierEnum);


NATRON_NAMESPACE_EXIT


DECLARE_OPERATORS_FOR_FLAGS(NATRON_NAMESPACE::KeyboardModifiers);

#endif // KEYSYMBOLS_H
